package api;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class IteratorStringTests {
    public static void main(String[] args) {
        Collection<String> c=new ArrayList<>();
        c.add("one");
        c.add("two");
        Iterator<String> iterator = c.iterator();
        while(iterator.hasNext()){
            String next = iterator.next();
            System.out.println(next.toUpperCase());
        }
    }
}
